<?php
    
    include_once '../clases/Antibioticos.php';
    
    $tc = $_REQUEST['tc'];
    
    if($tc == 1){
        
        $paciente = $_REQUEST['pac'];
        $ingre = $_REQUEST['ingre'];
        $datos = new Antibioticos("", "", "", "", "", "", "", "");
        $datos->Antibiotico($paciente,$ingre);
        
    }
    else if($tc == 2){
        $oidAntibiotico = $_REQUEST['oid'];
        $cantDias = $_REQUEST['dias'];
        $cantDosis = $_REQUEST['dosis'];
        $canTiempo = $_REQUEST['tiempo'];
        $paciente = $_REQUEST['pac'];
        
        $datos = new Antibioticos($oidAntibiotico, $cantDias, $cantDosis, $canTiempo, "", "", "", $paciente);
        $datos->registroAnt();
    }
    else if($tc == 3){
        
        $oidAnt = $_REQUEST['oidDosis'];
        $dosis = $_REQUEST['posi'];
        $fecha = $_REQUEST['fecha'];
        
        $datos = new Antibioticos("", "", "", "", "", "", "", "");
        $datos->Dosis($oidAnt,$dosis,$fecha);
    }
    else if($tc == 4){
        
        $dosis = $_REQUEST['oidDosis'];
        $posi = $_REQUEST['posi'];
        
        $datos = new Antibioticos("", "", "", "", "", "", "", "");
        $datos->dosisToma($dosis,$posi);
    }
    else if ($tc == 5){
        
        $oid = $_REQUEST['oid'];
        $cantDias = $_REQUEST['dias'];
        $cantDosis = $_REQUEST['dosis'];
        $canTiempo = $_REQUEST['tiempo'];
        $paciente = $_REQUEST['pac'];
        
        $datos = new Antibioticos($oidAntibiotico, $cantDias, $cantDosis, $canTiempo, "", "", "", $paciente);
        $datos->editarAnt($oid);
    }
?>
